package com.demo.designpattern.flyweight;

/**
 * Created by hunter
 *
 * @Description 享元模式
 */
public class MainTest {

    public static void main(String[] args) {

        HeroFactory factory = new HeroFactory();

        Hero ez = factory.getHero(HeroEnum.HERO_EZREAL);
        ez.releaseSkill();

        Hero galen = factory.getHero(HeroEnum.HERO_GALEN);
        galen.releaseSkill();

        Hero ez2 = factory.getHero(HeroEnum.HERO_EZREAL);
        ez2.releaseSkill();

        System.out.println(factory.getFlyWeightMap());
    }
}
